<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/common.jsp" %>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>编辑职位</title>
		<link rel="stylesheet" href="${url}/vendor/font-awesome/css/font-awesome.min.css" />
		<link rel="stylesheet" href="${url}/css/common.css" />
		<link rel="stylesheet" href="${url}/css/header.css" />
		<link rel="stylesheet" href="${url}/css/dropdown.css"/>
		<link rel="stylesheet" href="${url}/css/position-add.css"/>
		<link rel="Shortcut Icon" href="${url}/img/favicon.ico">
	</head>

	<body>
		<%@ include file="/WEB-INF/view/common/header.jsp" %>
		
		<div class="container">
			<form action="${url }/company/Company/editPosition.action" method="post">
				<input type="hidden" name="position.id" value="${position.id }">
				<div class="positionName item">
					<label for="positionName">
						<span class="title">职位名称：</span>
					</label>
					<input type="text" name="position.name" id="positionName" autofocus value="${position.name }"/>
				</div>
				<div class="salary item">
					<span class="title">薪资待遇：</span>
					<input type="text" name="position.salaryBegin" id="minSalary" value="${position.salaryBegin }"/>
					<span>~</span>
					<input type="text" name="position.salaryEnd" id="maxSalary" value="${position.salaryEnd }"/>
					<span>元/月</span>
				</div>
				<div class="adress option-template item">
					<div class="left">
						<span class="title">工作地址：</span>
					</div>
					<div class="dropdown">
						<span class="text" id="provinceText"></span>
						<i class="fa fa-sort-desc triangle"></i>
						<div class="option">
							<ul id="provinceUl">
								<c:forEach items="${provinceList }" var="province">
									<li data-value="${province.code }">${province.name }</li>
								</c:forEach>
							</ul>
						</div>
						<input type="hidden" name="position.provinceCode" value="${position.provinceCode }"/>
					</div>
					<div class="dropdown">
						<span class="text" id="cityText"></span>
						<i class="fa fa-sort-desc triangle"></i>
						<div class="option">
							<ul id="cityUl">
							</ul>
						</div>
						<input type="hidden" name="position.cityCode" value="${position.cityCode }"/>
					</div>
				</div>
				<div class="experience option-template item">
					<div class="left">
						<span class="title">工作经验：</span>
					</div>
					<div class="dropdown">
						<span class="text" id="workExperienceText"></span>
						<i class="fa fa-sort-desc triangle"></i>
						<div class="option">
							<ul id="workExperienceUl">
								<li data-value="1">实习生</li>
								<li data-value="2">应届毕业生</li>
								<li data-value="3">1~3年</li>
								<li data-value="4">3~5年</li>
								<li data-value="5">5~10年</li>
								<li data-value="6">10年以上</li>
								<li data-value="7">不限</li>
							</ul>
						</div>
						<input type="hidden" name="position.workExperience" value="${position.workExperience }"/>
					</div>
				</div>
				<div class="education-require option-template item">
					<div class="left">
						<span class="title">学历要求：</span>
					</div>
					<div class="dropdown">
						<span class="text" id="educationText"></span>
						<i class="fa fa-sort-desc triangle"></i>
						<div class="option">
							<ul id="educationUl">
								<li data-value="1">大专</li>
								<li data-value="2">本科</li>
								<li data-value="3">硕士</li>
								<li data-value="4">博士</li>
								<li data-value="5">其它</li>
								<li data-value="6">不限</li>
							</ul>
						</div>
						<input type="hidden" name="position.education" value="${position.education }"/>
					</div>
				</div>
				<div class="welfare item">
					<div class="left">
						<span class="title">福利待遇：</span>
					</div>
					<div class="right">
						<span class="edit" id="edit">编辑</span>
					</div>
					<input type="hidden" name="position.treatment" id="treatment" value="${position.treatment }"/>
				</div>
				<div class="description textarea-template item">
					<div class="left">
						
						<span class="title">职位描述：</span>
					</div>
					<div class="textarea">
						<textarea name="position.job" placeholder="请简单的描述一下这个职位">${position.job }</textarea>
					</div>
				</div>
				<div class="office-require textarea-template item">
					<div class="left">
						<span class="title">任职要求：</span>
					</div>
					<div class="textarea">
						<textarea name="position.duty" placeholder="请写出你对应聘者的要求">${position.duty }</textarea>
					</div>
				</div>
				<div class="overdue-time item">
					<span class="title">过期时间：</span>
					<input type="text" name="position.validDays" id="day" value="${position.validDays }"/>
					<span>天</span>
					<span class="end">有效期至2017年10月1日</span>
				</div>
				<button class="button" type="submit">更新</button>
			</form>
		</div>

		<%@ include file="/WEB-INF/view/common/footer.jsp" %>
		
		<!--模态框-->
		<div class="modal-box" id="modalBox">
			<div class="modal-container">
				<div class="tips">最多可选择12项</div>
				<ul class="lables">
					<li>五险一金</li>
					<li>住房公积金</li>
					<li>包吃</li>
					<li>包住</li>
					<li>周末双休</li>
					<li>带薪年假</li>
					<li>交通补助</li>
					<li>通讯补助</li>
					<li>年底双薪</li>
					<li>绩效奖金</li>
					<li>生育补贴</li>
					<li>节日礼金</li>
					<li>定期体检</li>
					<li>年度旅游</li>
					<li>生日礼金</li>
					<li>免费班车</li>
					<li>弹性工作</li>
					<li>年底分红</li>
					<li>白班</li>
				</ul>
				<div class="custom-way">
					<input type="text" name="customLable" id="customLable" placeholder="添加自定义，最多6个字" />
					<span id="addLable">添加</span>
				</div>
			</div>
		</div>
		
		<script>
			var positionProvinceCode = '${position.provinceCode}';
			var positionCityCode = '${position.cityCode}';
			var positionWorkExperience = '${position.workExperience}';
			var positionEducation = '${position.education}';
			var positionTreatment = '${position.treatment}';
		</script>
		<script src="${url}/vendor/jquery.min.js"></script>
		<script src="${url}/vendor/layer/layer.js"></script>
		<script src="${url}/js/common.js" ></script>
		<script src="${url}/js/dropdown.js"></script>
		<script src="${url}/js/position-add.js"></script>
		<script src="${url}/js/position-edit.js"></script>
	</body>

</html>
